package net.ocps.tchs.soap.object;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

import net.ocps.tchs.soap.Main;

public class StaticImage extends StaticObject {

	public StaticImage(  int x, int y, int width, int height, String path) {
		super(x, y);
		this.width = width;
		this.height = height;
		texture = new Sprite( new Texture(Gdx.files.internal(path)) );
		batch = new SpriteBatch();
	}

	@Override
	public void render() {
		batch.begin();
		{
			batch.setProjectionMatrix( Main.camera.combined );
			batch.draw(texture, x, y, width, height);
		}
        batch.end();
	}

	@Override
	public void onCreate() {
		//doesn;t do anything except for looks
	}

	int width, height;
	public SpriteBatch batch;
	public Sprite texture;
}
